package com.example.SpringBootMybatis.controller;


import com.example.SpringBootMybatis.common.Result;
import com.example.SpringBootMybatis.entity.Disease;
import com.example.SpringBootMybatis.entity.Form;
import com.example.SpringBootMybatis.entity.Prediction;
import com.example.SpringBootMybatis.entity.PredictionResult;
import com.example.SpringBootMybatis.service.PredictionService;
import com.github.pagehelper.PageInfo;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/result")
public class PredictionController {
    @Resource
    private PredictionService predictionService;

    @GetMapping
    public Result onsubmit(Form form){
        PredictionResult list = predictionService.onSubmit(form);
        return Result.success(list);
    }
}
